// import Vue from 'vue'
import Vue from 'vue'
// 引入element-ui库
import elementUI from 'element-ui'

import 'element-ui/lib/theme-chalk/index.css';
Vue.use(elementUI);


import 'normalize.css/normalize.css' // A modern alternative to CSS resets
// import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import '@/styles/index.scss' // global css
// //开发时候注释掉，打包时候启用
Vue.prototype.$echarts = window.echarts // 引入组件

import App from './App'
import store from './store'
import router from './router'
import i18n from './utils/i18n.js'
import filter from './utils/plugins/filter'
import {
  getDiffDay
} from '@/utils/moment.js'

import {
  isReadOnly
} from '@/utils/index.js'



// 全局导入过滤器
Object.keys(filter).forEach(key => Vue.filter(key, filter[key]))
// 防抖节流指令
import './directive/directive.js'
import '@/icons' // icon
import '@/assets/icon/font1/iconfont.css'
import '@/assets/icon/font/iconfont.css'

import '@/permission' // permission control
import VueLazyLoad from 'vue-lazyload';
import scroll from 'vue-seamless-scroll';
Vue.use(scroll);

// 引入全局组件

// 全球国家国旗组件
import CountryFlag from 'vue-country-flag'
Vue.component('country-flag', CountryFlag)

// 全局密码框组件
import pwdInput from '@/components/pwdInput/index.vue'
Vue.component("pwdInput", pwdInput); //全局自定义组件

// 全局高级搜索按钮组件
import powerSearch from '@/components/powerSearch/index.vue'
Vue.component("powerSearch", powerSearch); //全局自定义组件

// 全局最大值and最小值组件
import intervalInput from '@/components/intervalInput/index.vue'
Vue.component("intervalInput", intervalInput); //全局自定义组件
Vue.prototype.$getDiffDay = getDiffDay;
Vue.prototype.$isReadOnly = isReadOnly;

Vue.use(VueLazyLoad, {
  error: require('@/assets/images/nc.jpg'), // 报错需要的 图片
  // loading: require('@/assets/images/loading.gif') // 替换需要的图片
})



// localStorage.clear()
// location.reload()

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: h => h(App)
})
